package com.hcss.common.validation;

/**
 * @描述: 字段值字节长度校验
 * @作者: xuqian
 * @创建日期: 2018-10-18 11:24
 * @公司 浙江鸿程计算机系统有限公司
 */
import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE,
        ElementType.CONSTRUCTOR, ElementType.PARAMETER})
@Documented
@Constraint(validatedBy = {ByteLengthValidator.class})
public @interface ByteLength {
    String message() default "参数长度超过限制";

    int length();

    int scale() default 0;

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
